package org.zjx.analysis.flag;

import org.zjx.core.IWindow;
import org.zjx.util.ImageUtil;

import java.awt.*;
import java.awt.image.BufferedImage;

public class FlagsCSCAnalysis extends BaseFlagAnalysis{

    public FlagsCSCAnalysis(IWindow window, BufferedImage screenshot) {
        super(window, screenshot);
    }

    @Override
    protected Rectangle getContentArea() {
        return ImageUtil.createRect(9, 35, 275, 384);
    }

    @Override
    protected Point getMapSize() {
        return  new Point(160,209);
    }

    @Override
    protected void initResources() {

    }

    @Override
    public Rectangle closeArea() {
        return ImageUtil.createRect(258, 8, 276, 26);
    }

    @Override
    public Rectangle getOriginBounds() {
        return ImageUtil.createRect(257, 103, 541, 495);
    }

    @Override
    public Rectangle getRefImageArea() {
        return ImageUtil.createRect(9, 35, 30, 50);
    }

    @Override
    public BufferedImage getRefImage() {
        String image = "iVBORw0KGgoAAAANSUhEUgAAABYAAAAQCAYAAAAS7Y8mAAACgklEQVR4XpVUn5vjUBQNBoPBYPDBQjAw8GDgwUJhoLAQGCgMBAqBQqFQKAQKhYFAIVAIDBQKhYFiYf+AwMLCwNrZe27m9et0ZmHhfO9Xcu659573guq1h0d92v8X2nOv4Hz5Uir8WeAPr8Egt3tfgd+N9x1+vzXYHFKUqxRdU+F0KhHcknBtjudP5NdKeTZZ1wjXI9jdCPujQ320ihPXdT4Q34LE1+QkI5GdFTD1WBEvHaLOKrGtMoxWGapdjnKbICuir4mvwVRtU8JUDmnhdCRpvB4jbQukhzmKbQXX5BIg0XIwQMAfb8mu4doaSZkjHiUIH1KEVa6EZiuKXwrYn0v0bw5NnyPvMthVMhBHM6MK/hXALStVSoTNAFW85LxAvnaafiHNs+cE6TpGtogRhD8yREX6gZyjpio1vai9S5WI+9wzr3JWZ7JvJBP5Zh4Pap8tRhIoCGcSuZS0ngblXmmyKjVt7rNpqvphGEnIpoWTHBRGIqqmI/pujP33bFDMD7TLixzJxn5QzlKwzmxa6FjnTBVzZFCW4Nhb/PlVKuhhtVv0OERmOfTH+0gDeOV0RPQU6TmJVAhJZe1J+1N1wWlXoBHlgVk5rWU2KYdUZU6FXrHWkW6QoElhkM4zKUesqdMNnowjb6BfB+ygJ/L28mBQuiZ0BpVk1bUWsYsQZqFaSlN/J2UJ2v1E59wPGJ03iepodnaeRKpSMaReyfWtpqk0JdCbRSKSnA+D6u5ZbuO3EMupVeWB1o52Exv526ROob3e60lLsRessSnjS7NITmwW8lZMDdyjePguwkbsF2iHhcC/AYQS37PzrK2oNzLmOQp5E/jgeLWeuK2dlonqOTLIX4fRa0YOkTchAAAAAElFTkSuQmCC";
        return ImageUtil.stringToBufferedImage(image);
    }
}
